<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\validate;

/**
 * 员工验证器
 */
class Waiter extends AdminBase
{
    
    // 验证规则
    protected $rule =   [
        
        'name'              => 'require|unique:waiter',
        'phone'              => 'require|unique:waiter',
        'sex'              => 'require',
        'password'              => 'require|number',
        'authority'              => 'require|number',

    ];

    // 验证提示
    protected $message  =   [
        
        'name.require'              => '姓名不能为空',
        'name.unique'               => '姓名已存在',
        'phone.require'              => '电话不能为空',
        'phone.number'               => '电话必须为数字',
        'sex.require'              => '性别不能为空',
        'password.require'              => '密码不能为空',
        'password.number'               => '密码必须为数字',
        'authority.require'              => '权限不能为空',
        'authority.number'               => '权限必须为数字'
    ];

    // 应用场景
    protected $scene = [
        
        'edit' =>  ['name','phone','sex','password','authority'],
    ];
    
}
